# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=black
pkgver=19.10_beta0
_pkgver=${pkgver/_beta/b}
pkgrel=0
pkgdesc="The uncompromising Python code formatter"
url="https://github.com/psf/black"
arch="noarch !s390x !mips !mips64" # tests fail on s390x and mips
license="MIT"
depends="python3 py3-click py3-attrs py3-toml py3-appdirs py3-typed-ast py3-regex py3-pathspec"
makedepends="py3-setuptools"
checkdepends="py3-aiohttp py3-aiohttp-cors"
source="https://files.pythonhosted.org/packages/source/b/black/black-$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest tests/test_black.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}

sha512sums="abc6d2623ab50e59bed01fdb7a6ee7434c2d3e0f779a046d9141087aa6ef46b73b3aacc6bf84ac70b9384817bd2c707a3fa262811f11a2f61a99251d2b84dd02  black-19.10b0.tar.gz"
